﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<timetableasy.Models.Event>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th></th>
            <th>
                EventId
            </th>
            <th>
                StartDate
            </th>
            <th>
                EndDate
            </th>
            <th>
                IsMandatoryToDisplay
            </th>
            <th>
                ClassRoomIdFK
            </th>
            <th>
                EventTypeIdFK
            </th>
            <th>
                EventName
            </th>
            <th>
                EventAudianceIdFK
            </th>
            <th>
                SpeakerIdFK
            </th>
            <th>
                SpeakerName
            </th>
            <th>
                SpaceName
            </th>
            <th>
                CourseProgramIdFK
            </th>
            <th>
                IsValid
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%= Html.ActionLink("Edit", "Edit", new { id=item.EventId }) %> |
                <%= Html.ActionLink("Details", "Details", new { id=item.EventId })%>
            </td>
            <td>
                <%= Html.Encode(item.EventId) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.StartDate)) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.EndDate)) %>
            </td>
            <td>
                <%= Html.Encode(item.IsMandatoryToDisplay) %>
            </td>
            <td>
                <%= Html.Encode(item.ClassRoomIdFK) %>
            </td>
            <td>
                <%= Html.Encode(item.EventTypeIdFK) %>
            </td>
            <td>
                <%= Html.Encode(item.EventName) %>
            </td>
            <td>
                <%= Html.Encode(item.EventAudianceIdFK) %>
            </td>
            <td>
                <%= Html.Encode(item.SpeakerIdFK) %>
            </td>
            <td>
                <%= Html.Encode(item.SpeakerName) %>
            </td>
            <td>
                <%= Html.Encode(item.SpaceName) %>
            </td>
            <td>
                <%= Html.Encode(item.CourseProgramIdFK) %>
            </td>
            <td>
                <%= Html.Encode(item.IsValid) %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

